package com.dragon.modules.yuegou.query.busd;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.busd.WithdrawConfigEntity;
import com.dragon.modules.yuegou.enums.busd.WithdrawConfigType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商圈提现设置 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-07-30 16:36:57
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class WithdrawConfigQuery extends WithdrawConfigEntity implements Query<WithdrawConfigEntity> {

    /** ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 每月提现次数；-1表示不限查询条件 */
	@JsonUnwrapped(prefix = "withdrawTimes")
	private Condition<Integer> withdrawTimesCondition;

    /** 提现时间T+n查询条件 */
	@JsonUnwrapped(prefix = "withdrawDuration")
	private Condition<Integer> withdrawDurationCondition;

    /** 提现最小金额查询条件 */
	@JsonUnwrapped(prefix = "withdrawMinAmount")
	private Condition<BigDecimal> withdrawMinAmountCondition;

    /** 提现最大金额查询条件 */
	@JsonUnwrapped(prefix = "withdrawMaxAmount")
	private Condition<BigDecimal> withdrawMaxAmountCondition;

    /** 手续费比例查询条件 */
	@JsonUnwrapped(prefix = "feeRatio")
	private Condition<BigDecimal> feeRatioCondition;

    /** [枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<WithdrawConfigType> typeCondition;

    /** 服务费比例查询条件 */
	@JsonUnwrapped(prefix = "serviceFeeRatio")
	private Condition<BigDecimal> serviceFeeRatioCondition;

    /** 保证金比例 如 5% 填写的是5查询条件 */
	@JsonUnwrapped(prefix = "marginRatio")
	private Condition<BigDecimal> marginRatioCondition;

    /** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人ID查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public WithdrawConfigQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public WithdrawConfigQuery(WithdrawConfigEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public WithdrawConfigQuery(WithdrawConfigQuery other) {
		super(other);
		if (other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if (other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if (other.withdrawTimesCondition != null) {
			this.withdrawTimesCondition = other.withdrawTimesCondition.copy();
		}
		if (other.withdrawDurationCondition != null) {
			this.withdrawDurationCondition = other.withdrawDurationCondition.copy();
		}
		if (other.withdrawMinAmountCondition != null) {
			this.withdrawMinAmountCondition = other.withdrawMinAmountCondition.copy();
		}
		if (other.withdrawMaxAmountCondition != null) {
			this.withdrawMaxAmountCondition = other.withdrawMaxAmountCondition.copy();
		}
		if (other.feeRatioCondition != null) {
			this.feeRatioCondition = other.feeRatioCondition.copy();
		}
		if (other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if (other.serviceFeeRatioCondition != null) {
			this.serviceFeeRatioCondition = other.serviceFeeRatioCondition.copy();
		}
		if (other.marginRatioCondition != null) {
			this.marginRatioCondition = other.marginRatioCondition.copy();
		}
		if (other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		this.setOther(other);
	}

	private void setOther(WithdrawConfigQuery other){
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<WithdrawConfigEntity> toQueryWrapper() {
		QueryWrapper<WithdrawConfigEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (withdrawTimesCondition != null) {
			withdrawTimesCondition.toWrapper(wrapper, COL_WITHDRAW_TIMES);
		}
		if (withdrawDurationCondition != null) {
			withdrawDurationCondition.toWrapper(wrapper, COL_WITHDRAW_DURATION);
		}
		if (withdrawMinAmountCondition != null) {
			withdrawMinAmountCondition.toWrapper(wrapper, COL_WITHDRAW_MIN_AMOUNT);
		}
		if (withdrawMaxAmountCondition != null) {
			withdrawMaxAmountCondition.toWrapper(wrapper, COL_WITHDRAW_MAX_AMOUNT);
		}
		if (feeRatioCondition != null) {
			feeRatioCondition.toWrapper(wrapper, COL_FEE_RATIO);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (serviceFeeRatioCondition != null) {
			serviceFeeRatioCondition.toWrapper(wrapper, COL_SERVICE_FEE_RATIO);
		}
		if (marginRatioCondition != null) {
			marginRatioCondition.toWrapper(wrapper, COL_MARGIN_RATIO);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<WithdrawConfigEntity> getQueryWrapper(QueryWrapper<WithdrawConfigEntity> wrapper){
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置ID查询条件
	 * 
	 * @param idCondition ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return busdIdCondition 查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param busdIdCondition 查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回每月提现次数；-1表示不限查询条件
	 * 
	 * @return withdrawTimesCondition 每月提现次数；-1表示不限查询条件
	 */
	public Condition<Integer> withdrawTimes() {
		this.withdrawTimesCondition = new Condition<>();
		return this.withdrawTimesCondition;
	}
	
	/**
	 * 获取每月提现次数；-1表示不限查询条件
	 * 
	 * @return withdrawTimesCondition 每月提现次数；-1表示不限查询条件
	 */
	public Condition<Integer> getWithdrawTimesCondition() {
		return withdrawTimesCondition;
	}

	/**
	 * 设置每月提现次数；-1表示不限查询条件
	 * 
	 * @param withdrawTimesCondition 每月提现次数；-1表示不限查询条件
	 */
	public void setWithdrawTimesCondition(Condition<Integer> withdrawTimesCondition) {
		this.withdrawTimesCondition = withdrawTimesCondition;
	}

	/**
	 * 构造并返回提现时间T+n查询条件
	 * 
	 * @return withdrawDurationCondition 提现时间T+n查询条件
	 */
	public Condition<Integer> withdrawDuration() {
		this.withdrawDurationCondition = new Condition<>();
		return this.withdrawDurationCondition;
	}
	
	/**
	 * 获取提现时间T+n查询条件
	 * 
	 * @return withdrawDurationCondition 提现时间T+n查询条件
	 */
	public Condition<Integer> getWithdrawDurationCondition() {
		return withdrawDurationCondition;
	}

	/**
	 * 设置提现时间T+n查询条件
	 * 
	 * @param withdrawDurationCondition 提现时间T+n查询条件
	 */
	public void setWithdrawDurationCondition(Condition<Integer> withdrawDurationCondition) {
		this.withdrawDurationCondition = withdrawDurationCondition;
	}

	/**
	 * 构造并返回提现最小金额查询条件
	 * 
	 * @return withdrawMinAmountCondition 提现最小金额查询条件
	 */
	public Condition<BigDecimal> withdrawMinAmount() {
		this.withdrawMinAmountCondition = new Condition<>();
		return this.withdrawMinAmountCondition;
	}
	
	/**
	 * 获取提现最小金额查询条件
	 * 
	 * @return withdrawMinAmountCondition 提现最小金额查询条件
	 */
	public Condition<BigDecimal> getWithdrawMinAmountCondition() {
		return withdrawMinAmountCondition;
	}

	/**
	 * 设置提现最小金额查询条件
	 * 
	 * @param withdrawMinAmountCondition 提现最小金额查询条件
	 */
	public void setWithdrawMinAmountCondition(Condition<BigDecimal> withdrawMinAmountCondition) {
		this.withdrawMinAmountCondition = withdrawMinAmountCondition;
	}

	/**
	 * 构造并返回提现最大金额查询条件
	 * 
	 * @return withdrawMaxAmountCondition 提现最大金额查询条件
	 */
	public Condition<BigDecimal> withdrawMaxAmount() {
		this.withdrawMaxAmountCondition = new Condition<>();
		return this.withdrawMaxAmountCondition;
	}
	
	/**
	 * 获取提现最大金额查询条件
	 * 
	 * @return withdrawMaxAmountCondition 提现最大金额查询条件
	 */
	public Condition<BigDecimal> getWithdrawMaxAmountCondition() {
		return withdrawMaxAmountCondition;
	}

	/**
	 * 设置提现最大金额查询条件
	 * 
	 * @param withdrawMaxAmountCondition 提现最大金额查询条件
	 */
	public void setWithdrawMaxAmountCondition(Condition<BigDecimal> withdrawMaxAmountCondition) {
		this.withdrawMaxAmountCondition = withdrawMaxAmountCondition;
	}

	/**
	 * 构造并返回手续费比例查询条件
	 * 
	 * @return feeRatioCondition 手续费比例查询条件
	 */
	public Condition<BigDecimal> feeRatio() {
		this.feeRatioCondition = new Condition<>();
		return this.feeRatioCondition;
	}
	
	/**
	 * 获取手续费比例查询条件
	 * 
	 * @return feeRatioCondition 手续费比例查询条件
	 */
	public Condition<BigDecimal> getFeeRatioCondition() {
		return feeRatioCondition;
	}

	/**
	 * 设置手续费比例查询条件
	 * 
	 * @param feeRatioCondition 手续费比例查询条件
	 */
	public void setFeeRatioCondition(Condition<BigDecimal> feeRatioCondition) {
		this.feeRatioCondition = feeRatioCondition;
	}

	/**
	 * 构造并返回[枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 * 
	 * @return typeCondition [枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 */
	public Condition<WithdrawConfigType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 * 
	 * @return typeCondition [枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 */
	public Condition<WithdrawConfigType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 * 
	 * @param typeCondition [枚举]服务费收取方式：0-按统一比例-UNITE、1-按业态收取-TYPE查询条件
	 */
	public void setTypeCondition(Condition<WithdrawConfigType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回服务费比例查询条件
	 * 
	 * @return serviceFeeRatioCondition 服务费比例查询条件
	 */
	public Condition<BigDecimal> serviceFeeRatio() {
		this.serviceFeeRatioCondition = new Condition<>();
		return this.serviceFeeRatioCondition;
	}
	
	/**
	 * 获取服务费比例查询条件
	 * 
	 * @return serviceFeeRatioCondition 服务费比例查询条件
	 */
	public Condition<BigDecimal> getServiceFeeRatioCondition() {
		return serviceFeeRatioCondition;
	}

	/**
	 * 设置服务费比例查询条件
	 * 
	 * @param serviceFeeRatioCondition 服务费比例查询条件
	 */
	public void setServiceFeeRatioCondition(Condition<BigDecimal> serviceFeeRatioCondition) {
		this.serviceFeeRatioCondition = serviceFeeRatioCondition;
	}

	/**
	 * 构造并返回保证金比例 如 5% 填写的是5查询条件
	 * 
	 * @return marginRatioCondition 保证金比例 如 5% 填写的是5查询条件
	 */
	public Condition<BigDecimal> marginRatio() {
		this.marginRatioCondition = new Condition<>();
		return this.marginRatioCondition;
	}
	
	/**
	 * 获取保证金比例 如 5% 填写的是5查询条件
	 * 
	 * @return marginRatioCondition 保证金比例 如 5% 填写的是5查询条件
	 */
	public Condition<BigDecimal> getMarginRatioCondition() {
		return marginRatioCondition;
	}

	/**
	 * 设置保证金比例 如 5% 填写的是5查询条件
	 * 
	 * @param marginRatioCondition 保证金比例 如 5% 填写的是5查询条件
	 */
	public void setMarginRatioCondition(Condition<BigDecimal> marginRatioCondition) {
		this.marginRatioCondition = marginRatioCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 * 
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人ID查询条件
	 * 
	 * @param modifiedByCondition 更新人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人ID查询条件
	 * 
	 * @param delByCondition 删除人ID查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
